# 指定 tremolo 库的源代码路径  
cmake_minimum_required(VERSION 3.6)  
project(tremolo_lib)  
  
# 指定库的安装路径  
#set(CMAKE_INSTALL_PREFIX "")  

# 添加头文件搜索路径  
include_directories(./)  

# 添加要编译的源文件  
add_library(tremolo     
    ./bitwise.c
    ./codebook.c
    ./dsp.c
    ./floor0.c
    ./floor1.c
    ./floor_lookup.c
    ./framing.c
    ./mapping0.c
    ./mdct.c
    ./misc.c
    ./res012.c
    ./info.c
    ./vorbisfile.c)  
                 
# 获取当前目录下的所有 .h 文件  
file(GLOB HEADER_FILES "*.h")  

# 安装库文件  
install(TARGETS tremolo DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)  
install(FILES ${HEADER_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
